



//封装路由
//isShow控制footer的显示或隐藏
export default 
    [   
        {
            path:'/center',
            component:()=>import('@/pages/Center'),
            meta:{show:true},
            //二级路由组件
            children:[
                {
                    path:'myorder',
                    component:()=>import('@/pages/Center/myOrder'),
                },
                {
                    path:'grouporder',
                    component:()=>import("@/pages/Center/groupOrder")
                },
                {
                    path:'/center',
                    redirect:'/center/myorder'
                }
            ]
        },
        {
            path:'/paysuccess',
            component:()=>import('@/pages/PaySuccess'),
            meta:{show:true}
        },
        {
            path:'/pay',
            component:()=>import('@/pages/Pay'),
            meta:{show:true}
        },
        {
            path:'/trade',
            component:()=>import('@/pages/Trade'),
            meta:{show:true}
        },
        {
            path: '/home',
            component:()=>import('@/pages/Home'),
            //meta元属性：给路由添加元信息
            meta:{show:true}
        },
        {
            //配置路由时，在params后加问号，表示params可传递或不传递
            path: '/search/:keyword?',
            component: ()=>import('@/pages/Search'),
            meta:{show:false},
            name:'search'
        },
        {
            path: '/register',
            component: ()=>import('@/pages/Register'),
            meta:{show:false}
        },
        {
            path: '/login',
            component: ()=>import('@/pages/Login'),
            meta:{show:false}
        },
        {
            path:'/',
            redirect:'/home'
        },
        {
            path:'/detail/:skuId',
            component:()=>import('@/pages/Detail'),
            meta:{show:true}
        },
        {
            path:'/addcartsuccess',
            component:()=>import('@/pages/AddCartSuccess'),
            name:'AddCartSuccess'
        },
        {
            path:'/shopcart',
            component:()=>import('@/pages/ShopCart'),
            meta:{show:true}
        }
    ]
